﻿<%@ Page Title="MyFritz! Smart Home" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="myFritz.GUI._Default" %>

<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">
    <meta http-equiv="refresh" content="120">
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h1><%: Title %></h1>
            </hgroup>
        </div>
    </section>
</asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <h3>Geräte</h3>
    <asp:ListView runat="server" ID="ListView_Device">
        <ItemTemplate>
            <div class="itemWrapper">
                <table class="itemTable">
                    <colgroup>
                        <col width="30%">
                        <col width="50%">
                        <col >
                        <col >
                        <col >
                    </colgroup>
                    <tr>
                        <td class="cellLabel">
                            <b>Name:</b>
                        </td>
                        <td class="cellInfo">
                            <b><%#Eval("Name")%></b> (<%#Eval("ConnectionStatus")%>)
                        </td>
                        <td rowspan="2" <%#Eval("HasTemperature")%>>
                            <button onserverclick="OnOffBtn_Click" runat="server" id="OnOffBtn" class='<%#Eval("GetBtnCss")%>' itemid='<%#Eval("Id")%>'><%#Eval("IsChecked")%></button>
                        </td>
                        <td rowspan="2" <%#Eval("HasHKR")%>>
                            <button onserverclick="PlusBtn_Click" runat="server" id="PlusBtn" class="PlusMinusBtn" itemid='<%#Eval("Id")%>'>+</button>
                        </td>
                        <td rowspan="2" <%#Eval("HasHKR")%>>
                            <button onserverclick="MinusBtn_Click" runat="server" id="MinusBtn" class="PlusMinusBtn" itemid='<%#Eval("Id")%>'>-</button>
                        </td>
                    </tr>
                    <tr>
                        <td class="cellLabel">Typ: 
                        </td>
                        <td class="cellInfo">
                            <%#Eval("Productname")%> (<%#Eval("Manufacturer")%>)
                        </td>
                    </tr>
                    <tr <%#Eval("HasTemperature")%>>
                        <td class="cellLabel">aktuelle Temperatur: 
                        </td>
                        <td class="cellInfo">
                            <%#Eval("Temperature.Celsius")%> ° Celsius
                        </td>
                    </tr>
                    <tr <%#Eval("HasTemperature")%>>
                        <td class="cellLabel">aktuelle Leistung: 
                        </td>
                        <td class="cellInfo">
                            <%#Eval("Powermeter.Power")%> W
                        </td>
                    </tr>
                    <tr <%#Eval("HasTemperature")%>>
                        <td class="cellLabel">absoluter Verbrauch: 
                        </td>
                        <td class="cellInfo">
                            <%#Eval("Powermeter.Energy")%> Wh
                        </td>
                    </tr>
                    <tr <%#Eval("HasHKR")%>>
                        <td class="cellLabel">aktuelle Temperatur:
                        </td>
                        <td class="cellInfo">
                            <%#Eval("HKR.Tist")%>  ° Celsius
                        </td>
                    </tr>
                    <tr <%#Eval("HasHKR")%>>
                        <td class="cellLabel">Soll Temperatur:
                        </td>
                        <td class="cellInfo">
                            <%#Eval("HKR.Tsoll")%>  ° Celsius
                        </td>
                    </tr>
                    <tr <%#Eval("HasHKR")%>>
                        <td class="cellLabel">Komfort Temperatur:
                        </td>
                        <td class="cellInfo">
                            <%#Eval("HKR.Komfort")%>  ° Celsius
                        </td>
                    </tr>
                    <tr <%#Eval("HasHKR")%>>
                        <td class="cellLabel">Absenk Temperatur:
                        </td>
                        <td class="cellInfo">
                            <%#Eval("HKR.Absenk")%>  ° Celsius
                        </td>
                    </tr>
                </table>
                <hr />
            </div>
        </ItemTemplate>
    </asp:ListView>
</asp:Content>
